package com.funcas.pcloud.upms.facade;

import com.funcas.pcloud.common.ApiResult;
import com.funcas.pcloud.common.PageRequest;
import com.funcas.pcloud.upms.entity.User;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author funcas
 * @version 1.0
 * @date 2018年10月12日
 */
@RequestMapping("/sys")
public interface UserRestFacade {

    @RequestMapping(value = "/userinfo", method = RequestMethod.GET)
    public ApiResult getUserInfo(Long uid);

    @RequestMapping(value = "/users", method = RequestMethod.GET)
    public ApiResult getUserLists(PageRequest pageRequest, @RequestParam Map<String,Object> filter);

    @RequestMapping(value = "/users/all", method = RequestMethod.GET)
    public ApiResult getAllUserLists(String nickname);

    @RequestMapping(value = "/user/{userId}", method = RequestMethod.GET)
    public ApiResult modifyUser(@PathVariable("userId") Long userId);

    @RequestMapping(value = "/user", method = RequestMethod.POST)
    public ApiResult saveUser(User user);

    @RequestMapping(value = "/user/{userId}", method = RequestMethod.DELETE)
    public ApiResult deleteUser(@PathVariable("userId") Long userId);



}
